<section class="scrollable padder-md" data-ng-controller="DriverListController">
    <div class="m-b-md">
        <h3 class="m-b-none text-black">
            <i class="fa fa-list m-r-sm"></i>司机管理
        </h3>
    </div>
    <!-- Toolbar 按钮栏 -->
    <section class="panel panel-default scrollable">
        <header class="panel-heading">
            <div class="row">
                <div class="col-sm-5">
                    <div class="od-head-title">司机列表</div>
                </div>
            </div>
        </header>
        <form class="form-inline" data-ng-submit="getObjList()">
            <div class="wrapper row">
                <div class="col-sm-10">
                    <div class="form-group">
                        <input type="text"
                               class="input-sm form-control"
                               data-ng-model="queryObj.username" placeholder="司机账号">
                    </div>
                    <div class="form-group">
                        <input type="text"
                               class="input-sm form-control"
                               data-ng-model="queryObj.nickname" placeholder="司机名">
                    </div>
                    <div class="form-group">
                        <select class="input-sm form-control" data-ng-model="queryObj.authorized">
                            <option value="">审核状态</option>
                            <option value="">全部</option>
                            <option value="-1">未通过</option>
                            <option value="0">未提交</option>
                            <option value="1">待审核</option>
                            <option value="2">已审核</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <select class="input-sm form-control" data-ng-model="queryObj.expireState">
                            <option value="">过期状态</option>
                            <option value="">全部</option>
                            <option value="0">正常</option>
                            <option value="1">快过期</option>
                            <option value="2">已过期</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <input data-ng-model="queryObj.createTimeStart" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="注册开始时间"/>
                    </div>
                    <div class="form-group">
                        <input data-ng-model="queryObj.createTimeEnd" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="注册结束时间"/>
                    </div>
                    <div class="form-group">
                        <button class="form-control btn btn-sm btn-warning " type="submit">查询</button>
                    </div>
                </div>
                <div class="col-sm-2 text-right">
                    <!--<div class="form-group">-->
                    <!--<button class="form-control btn btn-sm btn-primary " type="button" data-ng-click="resetParam()">重置</button>-->
                    <!--</div>-->
                    <div class="form-group">
                        <button class="form-control btn btn-sm btn-primary " type="button" data-ng-click="exportDrivers()">导出</button>
                    </div>
                    <div class="form-group">
                        <button class="form-control btn btn-sm btn-success " type="button" data-ng-click="add()">新增</button>
                    </div>
                </div>
            </div>
        </form>
        <!-- 表格部分 -->
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>司机账号</th>
                    <th>司机名</th>
                    <th>手机号</th>
                    <th>状态</th>
                    <th>审核状态</th>
                    <th>过期状态</th>
                    <th>更新时间</th>
                    <th class="col-md-3">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr data-ng-repeat="driver in driverList"
                    ng-class="{'tr-green': driver.authorized==1, 'tr-yellow': driver.expireState==1, 'tr-red': driver.expireState==2}">
                    <td>{{(pagerObj.currentPage-1)*pagerObj.pageSize+$index+1}}</td>
                    <td>{{driver.username}}</td>
                    <td>{{driver.identityName}}</td>
                    <td>{{driver.tel}}</td>
                    <td>
                        <div data-ng-if="driver.enable == true">启用</div>
                        <div data-ng-if="driver.enable == false">停用</div>
                    </td>
                    <td>
                        <div data-ng-if="driver.authorized == 2">已审核</div>
                        <div data-ng-if="driver.authorized == 1">待审核</div>
                        <div data-ng-if="driver.authorized == 0">未提交</div>
                    </td>
                    <td>
                        <div data-ng-if="driver.expireState == 2">已过期</div>
                        <div data-ng-if="driver.expireState == 1">快过期</div>
                        <div data-ng-if="driver.expireState == 0">正常</div>
                    </td>
                    <td>{{driver.updateTime | date:'yyyy-MM-dd'}}</td>
                    <td>
                        <!--<a data-ng-if="driver.authorized == 1" href="javascript:void(0);" class="text-success m-r-xs" data-ng-click="authorized(driver.id, 2)"><i class="fa fa-check-circle"></i>审核</a>-->
                        <a href="javascript:void(0);" class="text-primary m-r-xs" data-ng-click="getCar(driver.id)"><i class="fa fa-car"></i>车辆</a>
                        <a href="javascript:void(0);" class="text-primary m-r-xs" data-ng-click="edit(driver.id)"><i class="fa fa-edit"></i>审核</a>
                        <a href="javascript:void(0);" class="text-danger m-r-xs" data-ng-click="delete(driver)"><i class="fa fa-remove"></i>删除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <!-- 分页控件 -->
        <footer class="panel-footer">
            <div data-ng-include="'comm/pager/pager.html'"></div>
        </footer>
    </section>
</section>
